#include<stdio.h>
int main()
{
	char  a;
	char b;
	char c;
	scanf("%c %c %c", &a, &b, &c);
	
	if(a>= b && c <=a)
	 
	 printf("%c\n",a);
	 
	if(b>= a && c <=b)
	 
	printf("%c\n",b);
	if(c>= a && b <=c)
	printf("%c\n",c);
	return 0;
}